package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SeckillRecordMapper;
import com.ruoyi.system.domain.SeckillRecord;
import com.ruoyi.system.service.ISeckillRecordService;

/**
 * 秒杀记录Service业务层处理
 * 
 * @author kinglu
 * @date 2021-11-30
 */
@Service
public class SeckillRecordServiceImpl implements ISeckillRecordService 
{
    @Autowired
    private SeckillRecordMapper seckillRecordMapper;

    /**
     * 查询秒杀记录
     * 
     * @param recordId 秒杀记录主键
     * @return 秒杀记录
     */
    @Override
    public SeckillRecord selectSeckillRecordByRecordId(Long recordId)
    {
        return seckillRecordMapper.selectSeckillRecordByRecordId(recordId);
    }

    /**
     * 查询秒杀记录列表
     * 
     * @param seckillRecord 秒杀记录
     * @return 秒杀记录
     */
    @Override
    public List<SeckillRecord> selectSeckillRecordList(SeckillRecord seckillRecord)
    {
        return seckillRecordMapper.selectSeckillRecordList(seckillRecord);
    }

    /**
     * 新增秒杀记录
     * 
     * @param seckillRecord 秒杀记录
     * @return 结果
     */
    @Override
    public int insertSeckillRecord(SeckillRecord seckillRecord)
    {
        return seckillRecordMapper.insertSeckillRecord(seckillRecord);
    }

    /**
     * 修改秒杀记录
     * 
     * @param seckillRecord 秒杀记录
     * @return 结果
     */
    @Override
    public int updateSeckillRecord(SeckillRecord seckillRecord)
    {
        return seckillRecordMapper.updateSeckillRecord(seckillRecord);
    }

    /**
     * 批量删除秒杀记录
     * 
     * @param recordIds 需要删除的秒杀记录主键
     * @return 结果
     */
    @Override
    public int deleteSeckillRecordByRecordIds(Long[] recordIds)
    {
        return seckillRecordMapper.deleteSeckillRecordByRecordIds(recordIds);
    }

    /**
     * 删除秒杀记录信息
     * 
     * @param recordId 秒杀记录主键
     * @return 结果
     */
    @Override
    public int deleteSeckillRecordByRecordId(Long recordId)
    {
        return seckillRecordMapper.deleteSeckillRecordByRecordId(recordId);
    }
}
